import { userClickAdvertCount } from "@/service/api/sp-store/wifi";

export default {
  methods: {
    async handleJumpAd(obj) {
      console.log("广告跳转===", obj);
      this.handleClickAdvertCount(obj);
      if (obj?.innerPageJson) {
        uni.navigateTo({
          url: obj?.innerPageJson.pagePath,
        });
        return;
      }
      if (obj?.thirdAppId && obj?.thirdAppPath) {
        uni.navigateToMiniProgram({
          appId: obj?.thirdAppId,
          path: obj?.thirdAppPath,
        });
      }
    },
    handleClickAdvertCount(obj) {
      userClickAdvertCount({ id: obj?.id });
    },
  },
};
